package com.huawei.opengl_isrc.slice;


import com.huawei.opengl_isrc.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;

public class MainAbilitySlice extends AbilitySlice {
    /**
     * @Author: DY
     * @Date: 2020/12/31
     */
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_Main);

        findComponentById(ResourceTable.Id_EGL).setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                present(new EGLSlice(),new Intent());
            }
        });
        //我的按钮
        findComponentById(ResourceTable.Id_GLSP).setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                present(new GLSurfaceProviderSlice(),new Intent());
            }
        });

    }
    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

}